<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'editFile.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<LINK href="<%=basePath%>css/folder.css" type="text/css"
	rel="stylesheet">

<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<script type="text/javascript">
		window.onload = function()
		{
			var oFCKeditor = new FCKeditor( 'fileContext' ) ;
			oFCKeditor.BasePath = "fckeditor/" ;
			oFCKeditor.ToolbarSet="Basic";
			oFCKeditor.ReplaceTextarea() ;
		}

function CheckForm()
{
   if(document.form1.fileName.value=="")
   { alert("文件名称不能为空！");
     return (false);
   }
   var fileName = document.getElementById("fileURL").value;
   var txt = document.getElementById("txt");
   txt.value=fileName;
   alert("修改成功！");
   return (true);
}

</script>
</head>

<body class="bodycolor" topmargin="5">

<table border="0" width="100%" cellspacing="0" cellpadding="3"
	class="small">
	<tr>
		<td class="Big"><img src="<%=basePath%>/img/file/folder_edit.gif"
			WIDTH="22" HEIGHT="20" align="absmiddle"><b><span
			class="Big1"> 编辑文件</span></b></td>
	</tr>
</table>
<form enctype="multipart/form-data"
	action="FileCenterServlet?action=updatefile&fileID=${file.fileID }"
	method="post" name="form1" onSubmit="return CheckForm();">
<table class="TableBlock" width="100%" align="center">
	<tr>
		<td nowrap class="TableData">文件名称：</td>
		<td class="TableData"><input type="text" name="fileName"
			size="50" maxlength="100" class="BigInput" value="${file.fileName }">
		</td>
	</tr>

	<tr>
		<td nowrap class="TableData" valign="top">文件内容：</td>
		<td class="TableData">
		<div><textarea id="fileContext" name="fileContext">
${file.remark }
</textarea></div>
		</td>
	</tr>
	<input type="hidden" name="txt" id="txt" />

	<tr height="25">
		<td nowrap class="TableData">附件选择：</td>
		<td class="TableData"><input type="file" name="fileURL"
			id="fileURL">如果不选择,默认选择原文件(<font color="blue">${fName
		}</font>)</td>
	</tr>

	<tr align="center" class="TableControl">
		<td colspan="2" nowrap><input type="submit" value="确定"
			class="BigButton">&nbsp;&nbsp; <input type="button"
			value="返回" class="BigButton"
			onClick="javascript:window.history.go(-1);"></td>
	</tr>
</table>
</form>
</body>
</html>
